package com.gang.blog.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gang.blog.domain.Article;

public interface ArticleMapper {
    int deleteByPrimaryKey(Integer articleId);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer articleId);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);
    //获取总记录条数
    int getCount();
    //获取单个用户的文章总数
    int getCountByUser();
    //按页面获取列表
    List<Article> getArticleList(@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize);
    //对article_content进行截取后的分页查询
    List<Article> selectByleft(@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize);
    //对article的后一部分进行查询
    Article selectBySubString(Integer articleId);
    //按用户id查询article并进行文章截取
    List<Article> selectByUserId(@Param("userId") Integer userId,@Param("pageStart") Integer pageStart,@Param("pageSize") Integer pageSize );
    
    
}